Skip to content

Fast Skylight sync for groceries and chores, without Claude (D212) - #28

Merged
mgilardi merged 3 commits into
mainfrom
feat/skylight-sync
Nov 16, 2026
Merged

mgilardi merged 3 commits into
mainfrom
feat/skylight-sync

Conversation

@mgilardi

Copy link
Copy Markdown
Collaborator

D212: the owner approved ("Yes, build it (Recommended)", Simon chat, 2026-11-15) a small non-Claude sync that keeps chores and groceries within 1 to 2 minutes of Skylight, both ways. Designed with Head of Communications.

What it is

  • engine/tools/skylight_sync.py, run every 120 s by a LaunchAgent (install prints the command; nothing is installed by this PR). Its own log, logs/skylight-sync.log, one line per pass; every write goes to data/log.md.
  • Talks to skylight-mcp 1.7.0 over stdio JSON-RPC, so login, the login challenge and 429 retries are skylight-mcp's own code. It has its own token file (data/.skylight-tokens.json), separate from Claude Code's connector.
  • Login from the Keychain (service Theseus Skylight), passed only in skylight-mcp's environment, never written or logged. An expired login stops the sync and leaves an alert until someone runs resume.
  • Off until config.json has "skylight_sync": "tool". When it's on, RULES §3.6 tells the Claude syncs to leave groceries and chores to it and show its alerts.
  • ek add-list --title T.

Rules (all tested)

  • A change on one side since the last pass is copied; opposite changes on both sides go to done.
  • Renamed on both sides: the newer wins if both sides give a time, otherwise both are kept and listed.
  • Deletions never cross (RULES 0.4). The survivor stays unlinked and is not re-created on the side it was deleted from.
  • Groceries: store = Skylight section (or grocery_store_sections); no section goes to the first store and gets that section; first match by normalized title and store, ignoring quantities and curly quotes.
  • Chores: only chore-map links. A Skylight occurrence matches the reminder's current due date, so a late completion can't tick the next one. A multi-chore link completes its reminder only when all are done. Nothing is created, dated or rescheduled.

Tested: 42 tests in tests/test_skylight_sync.py (now in scripts/ci-checks.sh): matching, done and rename conflicts, deletions, store moves, chores by date, the stdio client and its error handling against a stand-in MCP server, the off switch, and no credentials in the LaunchAgent. ek add-list refuses an existing name.
Not tested: a real Skylight account or real Reminders writes. Both wait on the Keychain login (N207) and the owner's go. Also unverified: the exact shape of skylight_list_chores rows for recurring occurrences, and whether Skylight list items carry an update time. The first run --dry-run against the real account checks both before anything is switched on.

Needs the owner: adding the Keychain item, a dry run he reads, turning on skylight_sync, and the LaunchAgent install.

🤖 Generated with Claude Code

mgilardi and others added 3 commits November 15, 2026 17:36
The owner approved a small non-Claude sync that keeps chores and the
grocery list within a couple of minutes of Skylight, both ways. A
LaunchAgent runs engine/tools/skylight_sync.py every 2 minutes. It talks
to skylight-mcp 1.7.0 over stdio, with its own token file, and reads the
login from the Keychain. A change on one side is copied; done beats
not-done; the newer rename wins when both sides have times, otherwise
both are kept and listed; deletions never cross, and a delete's survivor
isn't re-created. Chores match by the reminder's due date, and only
chore-map links sync. Nothing is created, dated or rescheduled on a chore.
Off until config says "skylight_sync": "tool". Also ek add-list.

Tested: 42 tests for the rules and the stdio client against a stand-in
MCP server, the CI checks, and ek add-list refusing an existing name. Not
tested: a real Skylight account or Reminders writes, which wait on the
Keychain login and the owner's go to switch it on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
So the owner can read what it would change before switching it on, and the
Claude syncs keep handling groceries until then. A dry run only reads.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Typing it at security's own prompt keeps it out of shell variables and the process list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mgilardi
mgilardi merged commit 9580ff2 into main Nov 16, 2026
3 checks passed
@mgilardi
mgilardi deleted the feat/skylight-sync branch November 16, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant